﻿@model Stiline.Web.Models.Account.LoginModel

@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Login</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
     if (ViewBag.Error != null && ViewBag.Error)
     {
         <p>@ViewBag.ErrorMessage</p>
     }

    <div class="editor-label">
        @Html.LabelFor(model => model.Login)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Login)
        @Html.ValidationMessageFor(model => model.Login)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Password)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Password)
        @Html.ValidationMessageFor(model => model.Password)
    </div>

    <p>
        <input type="submit" value="login" class="btn"/>
    </p>
    <p>
        @Html.ActionLink("Register","Create","Account")
    </p>
}